// --------------------------------------------------------------------------------------------
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
// 
// The contents of this file are subject to the Mozilla Public License Version
// 1.1 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
// 
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
// for the specific language governing rights and limitations under the
// License.
// 
// <remarks>
// Generated by IDLImporter from file nsISaveAsCharset.idl
// 
// You should use these interfaces when you access the COM objects defined in the mentioned
// IDL/IDH file.
// </remarks>
// --------------------------------------------------------------------------------------------
namespace Gecko
{
	using System;
	using System.Runtime.InteropServices;
	using System.Runtime.InteropServices.ComTypes;
	using System.Runtime.CompilerServices;
	
	
	/// <summary>
    /// DO NOT USE! For compat with legacy extension code only.
    /// </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("b3b8124f-0abb-460e-88ac-3cf1a0134b2d")]
	public interface nsISaveAsCharset
	{
		
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetCharsetAttribute([MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase aCharset);
		
		/// <summary>
        /// charset used for the conversion
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void Init([MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase charset, uint ignored, uint alsoIgnored);
		
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void Convert([MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Gecko.CustomMarshalers.AStringMarshaler")] nsAStringBase inString, [MarshalAs(UnmanagedType.LPStruct)] nsACStringBase retval);
	}
	
	/// <summary>nsISaveAsCharsetConsts </summary>
	public class nsISaveAsCharsetConsts
	{
		
		// <summary>
        // attributes
        // </summary>
		public const ulong mask_Fallback = 0x000000FF;
		
		// <summary>
        // mask for fallback (8bits)
        // </summary>
		public const ulong mask_Entity = 0x00000300;
		
		// <summary>
        // mask for entity (2bits)
        // </summary>
		public const ulong mask_CharsetFallback = 0x00000400;
		
		// <summary>
        // mask for charset fallback (1bit)
        // </summary>
		public const ulong attr_FallbackNone = 0;
		
		// <summary>
        // IGNORED
        // </summary>
		public const ulong attr_FallbackQuestionMark = 1;
		
		// <summary>
        // IGNORED
        // </summary>
		public const ulong attr_FallbackEscapeU = 2;
		
		// <summary>
        // IGNORED
        // </summary>
		public const ulong attr_FallbackDecimalNCR = 3;
		
		// <summary>
        // IGNORED
        // </summary>
		public const ulong attr_FallbackHexNCR = 4;
		
		// <summary>
        // IGNORED
        // </summary>
		public const ulong attr_EntityNone = 0;
		
		// <summary>
        // IGNORED
        // </summary>
		public const ulong attr_EntityBeforeCharsetConv = 0x00000100;
		
		// <summary>
        // IGNORED
        // </summary>
		public const ulong attr_EntityAfterCharsetConv = 0x00000200;
		
		// <summary>
        // IGNORED
        // </summary>
		public const ulong attr_CharsetFallback = 0x00000400;
		
		// <summary>
        // default attribute for plain text
        // </summary>
		public const ulong attr_plainTextDefault = attr_FallbackNone+attr_EntityNone;
		
		// <summary>
        // generate entity before charset conversion, use decimal NCR
        // </summary>
		public const ulong attr_htmlTextDefault = attr_FallbackDecimalNCR+attr_EntityBeforeCharsetConv;
	}
}
